<template>
  <div id="app">
      <transition mode="in-out" keep-alive>
        <router-view  v-wechat-title="$route.meta.title"></router-view>
      </transition>
  </div>
</template>

<script>
  require("../wechat/static/util/fix-screen.js")
  let CONSTANT = require('../wechat/static/constant/constant.js'),
      wsService = require("../wechat/static/common/wechat-jsdk.js");

  export default {
  name: 'app',
  data () {
    return {

    }
  },
  watch: {
      $route(to,from){
          this.setWechatShare(location.href)
      }
  },
  mounted(){
  },
    methods: {
        setWechatShare(href) {
            let url = href, share = {
                title: "侨信集团",
                imgUrl: "https://qiaoxin.oss-cn-shenzhen.aliyuncs.com/h5/logo.png",
                desc: "缔造价值产品，品质生活引领者。",
                link: `${url}`
            };

            wsService.default
                .getJsSDK(CONSTANT.URL.getJsApiConfig, {
                    params: {}
                })
                .then(() => {
                    wsService.default.setWXShare({
                        isShare: true,
                        shareDetail: share
                    });
                });
        }
    }
}
</script>

<style lang="less">
@import '~vux/src/styles/reset.less';
@import "styles/common.less";
@media screen and (min-width: 640px) {
  html{font-size: 18px;}
}
body,html,#app{
  height: 100%;
  font-family: SimHei;
  font-size: 12px;
    
    &::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }
}


img {
  height: auto;
}

.vux-icon-dot.active {
  background: #038FFF!important;
}

.weui-cells.vux-search_show {
  min-height: 100%;
}

.weui-dialog__hd{
  padding: 0rem!important;
}

.weui-dialog{
  top: 45%!important;
}

.common_p {
    font-size: .18rem;
    transform: scale(.9);
    font-weight: 400;
}

ul,li {
  list-style: none;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.flex-cont {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-box-justify {
  display: flex;
  justify-content: center;
}

.flex-box-align{
  display: flex;
  align-items: center;
}

.flex-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.flex-box-container {
  display: flex;
  flex-wrap: wrap;
}

.flex {
  flex:1;
}

.weui-toast{
  min-height: 2.5rem!important;
  min-width: 2.5rem!important;
  width:auto!important;
  height: auto;
}
.weui-tabbar {
  background-color: #fff!important;
}
</style>
